package com.spring;

import com.bean.Book;
import com.daoImpl.BookDaoImpl;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import java.sql.SQLException;
import java.util.List;

public class TestConfiguration2 {
    public static void main(String[] args) throws SQLException {
        ApplicationContext context = new AnnotationConfigApplicationContext(TestConfiguration.class);
//        context
        BookDaoImpl dao = new BookDaoImpl();
        List<Book> all = dao.findAll();
        System.out.println(all);
    }
}
